using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using System.IO;

namespace CommonLib
{
    public class PathConf
    {
        public static string adir;
        public static string tdir;
        public static string cdir;
        public static string curl;
        public static string mutex;
        public static string param;
        public static string commonlog;
        public static string clengthlog;

        static PathConf()
        {
            adir = Application.StartupPath;
            tdir = Path.Combine(adir, "temp");
            if (Directory.Exists(tdir) == false)
                Directory.CreateDirectory(tdir);
            string[] tmp = File.ReadAllLines(Path.Combine(adir, "datadir.conf"));
            cdir = tmp[0];
            if (Directory.Exists(cdir) == false)
                Directory.CreateDirectory(cdir);
            curl = tmp[1];
            mutex = Path.Combine(tdir, "convert.mutex");
            param = Path.Combine(tdir, "param.xml");
            commonlog = Path.Combine(tdir, "common.log");
            clengthlog = Path.Combine(tdir, "common-length.log");

        }
    }
}
